package com.awesome.lifecycledemo.activities;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.os.Bundle;

import com.awesome.lifecycledemo.R;
import com.awesome.sdk.util.ShowLogUtil;

/**
 * 自定义实现一个生命周期观察者，以及通知观察更新
 */
public class MainActivity extends AppCompatActivity {

    private MyListener mMyListener;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mMyListener = new MyListener(this);
    }

    @Override
    protected void onStart() {
        super.onStart();
        mMyListener.start();
    }

    @Override
    protected void onStop() {
        super.onStop();
        mMyListener.stop();
    }

    class MyListener {
        public MyListener(Context context) {
        }

        void start() {

        }

        void stop() {

        }
    }
}